package com.zhaorui.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName account
 */
@TableName(value ="account")
@Data
public class Account implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer accid;

    /**
     * 
     */
    private String accname;

    /**
     * 
     */
    private String accpass;

    /**
     * 
     */

    private Integer accstate;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Account other = (Account) that;
        return (this.getAccid() == null ? other.getAccid() == null : this.getAccid().equals(other.getAccid()))
            && (this.getAccname() == null ? other.getAccname() == null : this.getAccname().equals(other.getAccname()))
            && (this.getAccpass() == null ? other.getAccpass() == null : this.getAccpass().equals(other.getAccpass()))
            && (this.getAccstate() == null ? other.getAccstate() == null : this.getAccstate().equals(other.getAccstate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAccid() == null) ? 0 : getAccid().hashCode());
        result = prime * result + ((getAccname() == null) ? 0 : getAccname().hashCode());
        result = prime * result + ((getAccpass() == null) ? 0 : getAccpass().hashCode());
        result = prime * result + ((getAccstate() == null) ? 0 : getAccstate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", accid=").append(accid);
        sb.append(", accname=").append(accname);
        sb.append(", accpass=").append(accpass);
        sb.append(", accstate=").append(accstate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}